package org.jeecg.modules.service.impl;

import org.jeecg.modules.entity.RunnerMatchDevice;
import org.jeecg.modules.mapper.RunnerMatchDeviceMapper;
import org.jeecg.modules.service.IRunnerMatchDeviceService;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Description: 赛事设备
 * @Author: jeecg-boot
 * @Date:   2022-12-04
 * @Version: V1.0
 */
@Service
public class RunnerMatchDeviceServiceImpl extends ServiceImpl<RunnerMatchDeviceMapper, RunnerMatchDevice> implements IRunnerMatchDeviceService {
	
	@Autowired
	private RunnerMatchDeviceMapper runnerMatchDeviceMapper;
	
	@Override
	public List<RunnerMatchDevice> selectByMainId(String mainId) {
		return runnerMatchDeviceMapper.selectByMainId(mainId);
	}

	@Override
	public List<RunnerMatchDevice> selectByMainIdAndDevice(String mainId, String device) {
		Map<String,Object> map = new HashMap<>();
		map.put("mainId",mainId);
		map.put("device",device);
		return runnerMatchDeviceMapper.selectByMainIdAndDevice(map);
	}

	@Override
	public List<RunnerMatchDevice> selectByMainIdAndFlag(String mainId, String flag) {
		Map<String,Object> map = new HashMap<>();
		map.put("mainId",mainId);
		map.put("deviceflag",flag);
		return runnerMatchDeviceMapper.selectByMainIdAndFlag(map);
	}

}
